

import 'package:flutter/cupertino.dart';

class FMRouteTool {

  static push(BuildContext context,Widget classWidget) {
     Navigator.push(context, CupertinoPageRoute(builder: (context) =>classWidget));
  }

  static pushReplacement(BuildContext context,Widget classWidget) {
    Navigator.pushReplacement(
        context,
        PageRouteBuilder(
          pageBuilder: (context, animation, secondaryAnimation) => classWidget,
          transitionDuration: const Duration(seconds: 0), // 设置过渡时间为 0
        ),
    );
  }

  static pop(BuildContext context) {
     Navigator.pop(context);
  }
}